100 CLS
110 A$=STRING$(80,205)
120 PRINT A$
130 PRINT TAB(34)"DECIDE #2001"
140 COLOR 23
150 PRINT :PRINT :PRINT TAB(39)"IPCO"
160 COLOR 7
170 PRINT :PRINT :PRINT TAB(25)"PERSONAL COMPUTER OWNERS GROUP"
180 PRINT :PRINT :PRINT TAB(19)"p.o. box 10426, pittsburgh, pennsylvania 15234"
190 PRINT A$
200 PRINT :PRINT :PRINT :PRINT
210 PRINT TAB(28)"PRESS ANY KEY TO CONTINUE"
220 A$=INKEY$:IF A$="" THEN 220
250 CLEAR 500
260 MD=10
270 DIM L$(MD),F$(MD),V(MD),C(MD,MD),D(MD),Z(MD)
280 E$="END"
290 GOSUB 1530
300 PRINT "I CAN HELP YOU MAKE A DECISION.  ALL I NEED TO DO IS ASK SOME QUESTIONS AND THENANALYZE THE INFORMATION YOU GIVE."
310 PRINT:PRINT TAB(10) STRING$(60,205):PRINT
320 PRINT "WHICH OF THESE BEST DESCRIBES THE TYPE OF DECISION FACING YOU?"
330 PRINT :PRINT "  1) CHOOSING AN ITEM FROM VARIOUS ALTERNATIVES."
340 PRINT "  2) CHOOSING A COURSE OF ACTION FROM VARIOUS ALTERNATIVES."
350 PRINT "  3) MAKING A `YES' OR `NO' DECISION."
360 PRINT :PRINT"WHICH ONE (1,2, OR 3)?":
370 R$=INKEY$:IF R$="" THEN 370
380 T=VAL(R$):IF T<1 OR T>3 THEN 370
390 PRINT  T:GOSUB 1530
400 FOR J=1 TO 9:R$=INKEY$:NEXT:ON T GOTO 410,430,440
410 PRINT"WHAT TYPE OF ITEM MUST YOU DECIDE UPON?"
420 INPUT T$:GOTO 470
430 T$="COURSE OF ACTION":GOTO 470
440 T$="'YES' OR 'NO'"
450 NI=2:L$(1)="DECIDING YES":L$(2)="DECIDING NO"
460 GOTO  690
470 GOSUB 1530:NI=0
480 PRINT"I NEED TO HAVE A LIST OF EACH ";T$;" UNDER CONSIDERATION.":PRINT
500 PRINT"INPUT THEM ONE AT A TIME IN RESPONSE TO EACH QUESTION MARK.  THE ORDER IN WHICH   YOU INPUT THEM HAS NO SPECIAL SIGNIFICANCE."
520 PRINT :PRINT"TYPE THE WORD `";E$;"' TO INDICATE THAT THE WHOLE LIST HAS BEEN ENTERED.":PRINT
530 IF NI>=MD THEN PRINT "--LIST FULL--":GOTO  570
540 NI=NI+1:INPUT L$(NI)
550 IF L$(NI)<>E$ THEN 530
560 NI=NI-1
570 IF NI>=2 THEN 600
580 PRINT :PRINT"YOU MUST HAVE AT LEAST 2 CHOICES!":PRINT
590 PRINT"TRY AGAIN":GOSUB 1550:GOTO 470
600 GOSUB 1530:PRINT"O.K. HERE'S THE LIST YOU'VE GIVEN ME:":PRINT
610 FOR J=1 TO NI:PRINT"  ";J;CHR$(24);") ";L$(J):NEXT:PRINT
620 FOR J=1 TO 9:R$=INKEY$:NEXT:PRINT"IS THIS LIST CORRECT (Y OR N) ?";
630 R$=INKEY$:IF R$="" THEN 630
640 IF R$="Y" THEN PRINT "YES":GOTO 690
650 IF R$="N" THEN PRINT"NO"
660 IF R$="N" THEN PRINT:PRINT"THE LIST MUST BE RE-ENTERED"
670 IF R$="N" THEN GOSUB 1550:GOSUB 470
680 GOTO 630
690 GOSUB 1530:FOR J=1 TO 9:R$=INKEY$:NEXT
700 PRINT"NOW, THINK OF THE DIFFERENT FACTORS ";
710 IF T<3 THEN PRINT"THAT ARE IMPORTANT TO YOU IN CHOOSING THE BEST ";T$;"."
730 IF T=3 THEN PRINT" THAT ARE IMPORTANT TO YOU IN DECIDING ";T$;"."
740 PRINT :PRINT"INPUT THEM ONE AT A TIME IN RESPONSE TO EACH QUESTION MARK.":PRINT
750 PRINT"TYPE THE WORD`";E$;"' TO TERMINATE THE LIST."
760 PRINT :NF=0
770 IF NF>=MD THEN PRINT"--LIST FULL --":PRINT:GOTO 810
780 NF=NF+1:INPUT F$(NF)
790 IF F$(NF)<>E$ THEN 770
800 NF=NF-1:PRINT
810 IF NF<1 THEN PRINT"YOU MUST HAVE AT LEAST ONE ! REDO IT"
820 IF NF<1 THEN GOSUB 1550:GOTO 690
830 GOSUB 1530: PRINT"HERE'S THE LIST OF FACTORS YOU GAVE ME:":PRINT
840 FOR J=1 TO NF:PRINT "  ";J;CHR$(24);") ";F$(J):NEXT:PRINT
850 PRINT"DECIDE WHICH FACTOR ON THE LIST IS THE MOST IMPORTANT AND INPUT IT'S NUMBER.     (TYPE 0 IF THE LIST NEEDS TO BE CHANGED."
870 PRINT
880 INPUT A:A=INT(A):IF A=0 THEN 690
890 IF A>NF OR A<0 THEN 830
900 GOSUB 1530:IF NF=1 THEN 1020
910 PRINT"NOW LET'S SUPPOSE WE HAVE A SCALE OF IMPORTANCE RANGING FROM 0 TO 10."
930 PRINT:PRINT"  WE'LL GIVE ";F$(A);" A VALUE OF 10 SINCE ";F$(A)
950 PRINT" WAS RATED THE MOST IMPORTANT.":PRINT
960 PRINT"ON THIS SCALE, WHAT VALUE OF IMPORTANCE WOULD THE OTHER FACTORS HAVE?"
980 FOR J=1 TO NF:IF J=A THEN 1010
990 PRINT:PRINT F$(J):INPUT THE (J)
1000 IF V(J)<0 OR V(J)>10 THEN
1010 NEXT
1020 V(A)=10:Q=O:FOR J=1 TO NF:Q=Q+V(J):NEXT:FOR J=1 TO NF
1030 V(J)=V(J)/Q:NEXT:GOSUB 1530
1040 IF T<>3 THEN PRINT"EACH ";T$;
1050 IF T=3 THEN PRINT"DECIDING `YES' OR DECIDING `NO' ";
1060 PRINT " MUST NOW BE COMPAIRED WITH RESPECT TO EACH IMPORTANCE FACTOR."
1080 PRINT "WE'LL CONSIDER EACH FACTOR SEPARATELY AND THEN RATE";
1090 IF T<>3 THEN PRINT" EACH ";T$" IN TERMS";
1100 IF T=3 THEN PRINT"DECIDING `YES' OR DECIDING `NO' IN TERMS ";
1110 PRINT " OF THAT FACTOR ONLY.":PRINT
1120 PRINT "LET'S GIVE ";L$(1);" A VALUE OF 10 ON EVERY SCALE.  THE OTHER ";T$;" UNDER CONSIDERATION WILL BE ASSIGNED A VALUE HIGHER OR LOWER THAN 10."
1150 PRINT " THIS VALUE DEPENDS ON HOW MUCH YOU THINK IT IS BETTER OR WORSE THAN ";L$(1);"."
1180 PRINT " ********* (HIT ANY KEY TO CONTINUE)"
1190 R$=INKEY$:IF R$="" THEN 1190
1200 FOR J=1 TO NF
1210 PRINT  TAB(8);STRING$(25,"-")
1220 PRINT "CONSIDERING ONLY ";F$(J);" AND ASSIGNING 10 TO ";L$(1);" ;"
1240 PRINT "WHAT VALUE WOULD YOU ASSIGN TO ";
1250 FOR K=2 TO NI
1260 PRINT L$(K);:INPUT C(K,J):IF C(K,J)>=0 THEN 1280
1270 PRINT "  -- NEGATIVE VALUES NOT LEGAL --":GOTO 1260
1280 NEXT:PRINT:C(1,J)=10:NEXT
1290 FOR J=1 TO NF:Q=0:FOR K=1 TO NI
1300 Q=Q+C(K,J):NEXT:FOR K=1 TO NI
1310 C(K,J)=C(K,J)/Q:NEXT:NEXT
1320 FOR K=1 TO NI:D(K)=0:FOR J=1 TO NF
1330 D(K)=D(K)+C(K,J)*V(J):NEXT:NEXT
1340 MX=0:FOR K=1 TO NI
1350 IF D(K)>MX THEN MX=D(K)
1360 NEXT:FOR K=1 TO NI:D(K)=D(K)*100/MX:NEXT
1370 FOR K=1 TO NI:Z(K)=K:NEXT:NM=NI-1
1380 FOR K=1 TO NI:FOR J=1 TO NM:N1=Z(J):N2=Z(J+1): IF D(N1)>D(N2) THEN 1400
1390 Z(J+1)=N1:Z(J)=N2
1400 NEXT:NEXT:J1=Z(1):J2=Z(2):DF=D(J1)-D(J2):GOSUB 1530
1410 PRINT L$(J1);
1420 PRINT" COMES OUT BEST";
1430 IF DF<5 THEN PRINT " BUT IT'S VERY CLOSE.":GOTO 1470
1440 IF DF<10 THEN PRINT" BUT IT'S FAIRLY CLOSE.":GOTO 1470
1450 IF DF<20 THEN PRINT" BY A FAIR AMOUNT.":GOTO 1470
1460 PRINT" QUITE DECISIVELY."
1470 PRINT TAB(16)"******* HERE IS THE FINAL LIST IN ORDER ********"
1480 PRINT L$(J1);" HAS BEEN GIVEN A VALUE OF 100 AND THE OTHERS RATED ACCORDINGLY."
1500 PRINT TAB(10) STRING$(60,205)
1510 FOR J=1 TO NI:Q=Z(J):PRINT D(Q),L$(Q):NEXT
1520 END
1530 FOR J=1 TO 400:NEXT
1540 CLS:PRINT TAB(26);"DECIDE":PRINT:RETURN
1550 FOR J=1 TO 1500:NEXT:RETURN
$(Q):NEXT
1520 END
1530 FOR J=1 TO 400:NEXT
1540 CLS:PRINT TAB(26);"DECIDE":PRINT:RETURN
1550 FOR J=1 TO